ExpressionEngine: {exp:query} producing error

Posted by Josh Brown on Stack Overflow See other posts from Stack Overflow or by Josh Brown
Published on 2010-05-03T03:25:04Z Indexed on 2010/05/03 3:28 UTC
Read the original article Hit count: 450

Filed under:
|
|

Hi.

I have this code in place to pull some relation data from the database based on a ID of another weblog entry. The relationship custom field would not work for my situation. I have tested the SQL with MySQL and get no errors. But I get an error when I pull up the page.

{exp:query sql="SELECT entry_id,field_id_16,field_id_19 FROM exp_weblog_data WHERE field_id_15='2' AND weblog_id='6'"}

Also, I want to populate the “field_id_15” from the url. I have tried using the “segment_*” tag, but nothing. Maybe it is something else.

Any help is greatly appreciated.

Thanks, Josh

© Stack Overflow or respective owner

Related posts about php

Related posts about expressionengine